import i18n from '@/locale/index.js'
import pinia from '@/store/index.js'

import tab from './tab'
import auth from './auth'
import modal from './modal'
// 自定义showModal组件
import showModal from '@/plugins/showModal/index.js'

import showAlarmMsg from '@/plugins/nativeMsg/index.js'

import directive from '@/directive/index.js'

import { getDicts } from '@/api/system/dict/data'

export function install(app) {
	app.use(i18n).use(pinia).use(showModal).use(showAlarmMsg)
	// 页签操作
	app.config.globalProperties.$tab = tab
	// 认证对象
	app.config.globalProperties.$auth = auth
	// 模态框对象
	app.config.globalProperties.$modal = modal
	// 字典查询
	app.config.globalProperties.$getDicts = getDicts
	//注册指令
	directive(app)
}